user  {{ user }};
worker_processes  {{ worker_processes }};
events {
    worker_connections  {{ max_open_file }};
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format main 'remote_addr - $remote_user [$time_local] "request" '
                    '$status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"  ';

    access_log    /var/log/nginx/access.log main;
    sendfile on;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       {{ port }} default_server;
        server_name  {{ server_name }};
        location / {
            root   {{ root }};
            index  index.html index.htm info.php;
        }
        location ~ \.php${
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
 	fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;


        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
